package com.group.Service.Impl;

import com.group.DAO.RepairDAO;
import com.group.Enity.Repair;
import com.group.Enity.RepairType;
import com.group.Service.RepairService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class RepairServiceImpl implements RepairService {

    @Autowired
    private RepairDAO repairDAO;

    @Override
    public List<Repair> getRepairs(Integer status,Integer comId) {
        return repairDAO.getRepairs(status,comId);
    }

    @Override
    public List<RepairType> getRepairTypes() {
        return repairDAO.getRepairTypes();
    }

    @Override
    public List<HashMap<String, Integer>> getCounts() {
        return repairDAO.getCounts();
    }

    @Override
    public void deleteById(int id) {
        repairDAO.deleteById(id);
    }

    @Override
    public void update(int id) {
        repairDAO.update(id);
    }
}
